#include "master.h"
int MASTER::start()
{
    int ret = 0;
    // ret = m_vi->v4l2_startcapture();
    // if(ret < 0){
    //     cout<<"error:v4l2_vi module not start"<<endl;
    //     return ret;
    // }

    ret =  m_display->start();
    if(ret < 0){
        cout<<"error:display module not start"<<endl;
        return ret;
    }
    cout<<"master is start"<<endl;
    return ret;
}


MASTER::MASTER(void)
{
    m_display = new DISPLAY();
    //m_display = new DISPLAY(this->m_width,this->m_height,this->m_pixfmt);
    // m_vi = new VI();
    // m_vo = new VO();
    // trigger_connect((void *)m_vi,SIGNAL_VIFRAME_IN,(void*)this->m_display,v4l2_viframe_in);
}

MASTER::~MASTER(void)
{
    delete m_display;
    delete m_vi;
    delete m_vo;
}
